<!-- 框架 -- 入口文件-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>ENTRANCE FILE</title>
    <link rel="stylesheet" href="./plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="./plugins/font-awesome/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="./src/css/app.css" media="all">
    <link rel="stylesheet" href="./src/css/themes/default.css" id="skin" media="all" kit-skin>
    <!-- 新增kit-skin 是为了可以切换背景颜色-->
</head>
<body class="kit-theme">
<div class="layui-layout layui-layout-admin kit-layout-admin">
    <div class="layui-header">
        <!--PC端logo 全称-->
        <div class="layui-logo">MEI LAN ECHO</div>
        <!--Mobile logo 简称 默认隐藏 -->
        <div class="layui-logo kit-logo-mobile">M</div>
        <ul class="layui-nav layui-layout-left kit-nav">
            <li class="layui-nav-item"><a href="javascript:;">控制台</a></li>
            <li class="layui-nav-item"><a href="javascript:;">商品管理</a></li>
            <li class="layui-nav-item"><a href="javascript:;" id="pay"><i class="fa fa-gratipay" aria-hidden="true"></i>
                捐赠我</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;">邮件管理</a></dd>
                    <dd><a href="javascript:;">消息管理</a></dd>
                    <dd><a href="javascript:;">授权管理</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right kit-nav">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <i class="layui-icon">&#xe61b;</i> 皮肤
                </a>
                <dl class="layui-nav-child skin">
                    <dd><a href="javascript:;" data-skin="default" style="color:#393D49;"><i
                            class="layui-icon">&#xe658;</i> 默认</a></dd>
                    <dd><a href="javascript:;" data-skin="orange" style="color:#ff6700;"><i
                            class="layui-icon">&#xe658;</i> 橘子橙</a></dd>
                    <dd><a href="javascript:;" data-skin="green" style="color:#00a65a;"><i
                            class="layui-icon">&#xe658;</i> 原谅绿</a></dd>
                    <dd><a href="javascript:;" data-skin="pink" style="color:#FA6086;"><i
                            class="layui-icon">&#xe658;</i> 少女粉</a></dd>
                    <dd><a href="javascript:;" data-skin="blue.1" style="color:#00c0ef;"><i
                            class="layui-icon">&#xe658;</i> 天空蓝</a></dd>
                    <dd><a href="javascript:;" data-skin="red" style="color:#dd4b39;"><i class="layui-icon">&#xe658;</i>
                        枫叶红</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://m.zhengjinfan.cn/images/0.jpg" class="layui-nav-img"> Van
                </a>
                <dl class="layui-nav-child">
                    <!--
                    data-options： 为配置路由跳转地址，icon：为文字前面的符号 title：鼠标经过时的提示框 id：是唯一的，不要重复
                    -->
                    <dd><a href="javascript:;" kit-target
                           data-options="{url:'basic.html',icon:'&#xe658;',title:'基本资料',id:'966'}"><span>基本资料</span></a>
                    </dd>
                    <dd><a href="javascript:;">安全设置</a></dd>
                    <!--添加多个悬浮提示框时需要：
                    1.a标签上 kit-target data-options="{url:'basic.html',icon:'&#xe658;',title:'基本资料',id:'966'}" id可以不一样
                    2.给文字内容包裹一个span标签 eg: <span>基本资料</span> <span>安全设置</span>-->
                </dl>
            </li>
            <li class="layui-nav-item"><a href="login.html"><i class="fa fa-sign-out" aria-hidden="false"></i> 注销</a>
            </li>

        </ul>
        <div class="layui-side layui-bg-black kit-side">
            <div class="layui-side-scroll">
                <div class="kit-side-fold"><i class="fa fa-navicon" aria-hidden="true"></i></div>
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                <ul class="layui-nav layui-nav-tree" lay-filter="kitNavbar" kit-navbar>
                    <li class="layui-nav-item layui-nav-itemed">
                    <li class="layui-nav-item layui-nav-itemed">
                        <a href="javascript:;"><i class="layui-icon" aria-hidden="true">&#xe632;</i><span>&nbsp;布局</span></a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;" kit-target
                                   data-options="{url:'gird.html',icon:'&#xe658;',title:'栅格系统',id:'0'}"><i
                                    class="layui-icon">&#xe658;</i><span>&nbsp;栅格系统</span></a></dd>
                            <dd><a href="javascript:;" kit-target
                                   data-options="{url:'layout.html',icon:'&#xe630;',title:'后台布局',id:'1'}"><i
                                    class="layui-icon">&#xe630;</i><span>&nbsp;后台布局</span></a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="javascript:;"><i class="fa fa-plug" aria-hidden="true"></i><span>&nbsp;页面元素</span></a>
                        <dl class="layui-nav-child">
                            <dd>
                                <a href="javascript:;" kit-target
                                   data-options="{url:'button.html',icon:'&#xe6c6;',title:'按钮',id:'2'}">
                                    <i class="layui-icon">&#xe6c6;</i><span>&nbsp;按钮</span></a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="form.html" data-icon="fa-user" data-title="表单" kit-target
                                   data-id='3'><i class="layui-icon" aria-hidden="true">&#xe63c;</i><span>&nbsp;表单</span></a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="icon.html" data-icon="&#xe6af;" data-title="图标" kit-target
                                   data-id='5'><i class="layui-icon">&#xe6af;</i><span>&nbsp;图标</span></a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="animation.html" data-icon="&#xe628;" data-title="动画" kit-target
                                   data-id='6'><i class="layui-icon">&#xe628;</i><span>&nbsp;动画</span></a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="laydate.html" data-icon="&#xe637;" data-title="动画" kit-target
                                   data-id='7'><i class="layui-icon">&#xe637;</i><span>&nbsp;日期模块</span></a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="nav.html" data-icon="&#xe62a;" data-title="导航"
                                   kit-target data-id='8'><i class="layui-icon">&#xe62a;</i><span>&nbsp;导航</span></a>
                            </dd>
                            <dd>
                                <a href="javascript:;" kit-target
                                   data-options="{url:'progress.html',icon:'&#xe658;',title:'进度条',id:'9'}"><i
                                        class="layui-icon">&#xe658;</i><span>&nbsp;进度条</span></a>
                            </dd>
                            <dd>
                                <a href="javascript:;" kit-target
                                   data-options="{url:'panel.html',icon:'&#xe62e;',title:'折叠面板',id:'10'}"><i
                                        class="layui-icon">&#xe62e;</i><span>&nbsp;折叠面板</span></a>
                            </dd>
                            <dd>
                                <a href="javascript:;" kit-target
                                   data-options="{url:'table_element.html',icon:'&#xe62d;',title:'表格',id:'11'}"><i
                                        class="layui-icon">&#xe62d;</i><span>&nbsp;表格</span></a>
                            </dd>
                            <dd>
                                <a href="javascript:;" kit-target
                                   data-options="{url:'auxiliary.html',icon:'&#xe658;',title:'辅助元素',id:'12'}"><i
                                        class="layui-icon">&#xe658;</i><span>&nbsp;辅助元素</span></a>
                            </dd>
                        </dl>
                    </li>
                    </li>
                    <li class="layui-nav-item layui-nav-itemed">
                        <a href="javascript:;"><i class="layui-icon" aria-hidden="true">&#xe628;</i><span>&nbsp;内置模块</span></a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;" kit-target
                                   data-options="{url:'layui_page.html',icon:'&#xe658;',title:'分页',id:'4'}"><i
                                    class="layui-icon">&#xe658;</i><span>&nbsp;分页</span></a>
                            </dd>
                            <dd><a href="javascript:;" kit-target
                                   data-options="{url:'layer.html',icon:'&#xe658;',title:'弹出层',id:'13'}"><i
                                    class="layui-icon">&#xe658;</i><span>&nbsp;弹出层</span></a>
                            </dd>
                            <dd><a href="javascript:;" kit-target
                                   data-options="{url:'upload.html',icon:'&#xe62f;',title:'上传文件',id:'14'}"><i
                                    class="layui-icon">&#xe62f;</i><span>&nbsp;上传文件</span></a>
                            </dd>
                            <dd><a href="javascript:;" kit-target
                                   data-options="{url:'carousel.html',icon:'&#xe658;',title:'轮播',id:'15'}"><i
                                    class="layui-icon">&#xe634;</i><span>&nbsp;轮播</span></a>
                            </dd>
                            <dd><a href="javascript:;" kit-target
                                   data-options="{url:'layedit.html',icon:'&#xe658;',title:'文本編輯',id:'16'}"><i
                                    class="layui-icon">&#xe658;</i><span>&nbsp;文本編輯</span></a>
                            </dd>
                        </dl>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="layui-body" id="container">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;"><i class="layui-icon layui-anim layui-anim-rotate layui-anim-loop">&#xe63e;</i>
            请稍等...
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        2017 &copy;
        <a href="http://kit.zhengjinfan.cn/">小虫科技</a> MEI
    </div>
</div>
</body>
<script src="./plugins/layui/layui.js"></script>
<script>

//  base: 'src/js/',  // src/js会自动调用src/js下的js文件
// 默认页面的配置在src/js下面的tab.js文件中

  var message;
  layui.config({  //配置index.html为入口文件
    base: 'src/js/',   // src/js会自动调用src/js下的js文件
    version: '2.0.4'
  }).use(['app', 'message'], function () {
    var app = layui.app, //下列三项为必写项
        $ = layui.jquery,  // 调用jquery.js
        layer = layui.layer; //调用layer弹框
    //将message设置为全局以便子页面调用
    message = layui.message;
    //主入口
    app.set({
      type: 'iframe'
    }).init();
    $('#pay').on('click', function () {
      layer.open({
        title: false,
        type: 1,
        content: '<img src="/src/images/pay.png" />',
        area: ['500px', '250px'],
        shadeClose: true //true 点击遮罩层关闭弹窗 false 点击遮罩层不关闭弹窗
      });
    });
    $('dl.skin > dd').on('click', function () {
      var $that = $(this);
      var skin = $that.children('a').data('skin');
      switchSkin(skin);
    });
    var setSkin = function (value) {
          layui.data('kit_skin', {
            key: 'skin',
            value: value
          });
        },
        getSkinName = function () {
          return layui.data('kit_skin').skin;
        },
        switchSkin = function (value) {
          var _target = $('link[kit-skin]')[0];
          _target.href = _target.href.substring(0, _target.href.lastIndexOf('/') + 1) + value + _target.href.substring(_target.href.lastIndexOf('.'));
          setSkin(value);
        },
        initSkin = function () {
          var skin = getSkinName();
          switchSkin(skin === undefined ? 'default' : skin);
        }();

  })
</script>
</html>